package com.my.sbcas.controller;

import com.my.sbcas.model.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class AuthController {
    @RequestMapping("/getUser")
    public User getUser(HttpServletRequest request){
        String remoteUser = request.getRemoteUser();
        User user = new User();
        user.setName(remoteUser);
        return  user;
    }
}
